jsonp-p
jsonp promisify wrapper.
Getting started
npm i jsonp-p
Usage
import jsonpP from 'jsonp-p';
jsonpP(url, jsonpOpts).promise
.then(response => {})
.catch(error => {});
Promise is required
jsonpOpts
https://github.com/webmodules/jsonp#jsonpurl-opts-fn
Cancel
const { cancel } = jsonpP(url);
cancel();
Contributing
- Fork it!
- Create your feature branch: git checkout -b my-new-feature
- Commit your changes: git commit -am 'Add some feature'
- Push to the branch: git push origin my-new-feature
- Submit a pull request :D
License
MIT
© sugarshin